package com.woniuxy.commons.entity;
/**
 * @program: bzeducation
 * @author: Xingqilin
 * @create: 2020-07-16 10:59
 * @description:完型填空题库
 */

import lombok.experimental.Accessors;

import java.io.Serializable;
import java.sql.Date;
import java.util.List;

@Accessors(chain = true)
public class ClozeBank implements Serializable {

    private static final long serialVersionUID = 2020071610591L;//具体数值自己定义
    //    完型填空ID
    private long clozeId;
    //    完型填空题目
    private String clozeTopic;
    //    出题时间
    private String clozeBirth;
    //    出题人
    private String clozeFounder;
    //    类别ID
    private long clozeType;
    //    知识点ID
    private long clozeKnowledge;
    //    分数
    private double clozePoint;
    //    科目
    private String clozeSubject;
    //    试题学期
    private long clozeTerm;
    //    试题图片
    private String clozeImg;
    //    完型选项
    private List<ClozeSelect> clozeSelects;

    private String displayKnow;

    public long getClozeId() {
        return clozeId;
    }

    public void setClozeId(long clozeId) {
        this.clozeId = clozeId;
    }


    public String getClozeTopic() {
        return clozeTopic;
    }

    public void setClozeTopic(String clozeTopic) {
        this.clozeTopic = clozeTopic;
    }


    public String getClozeBirth() {
        return clozeBirth;
    }

    public void setClozeBirth(String clozeBirth) {
        this.clozeBirth = clozeBirth;
    }


    public String getClozeFounder() {
        return clozeFounder;
    }

    public void setClozeFounder(String clozeFounder) {
        this.clozeFounder = clozeFounder;
    }


    public long getClozeType() {
        return clozeType;
    }

    public void setClozeType(long clozeType) {
        this.clozeType = clozeType;
    }


    public long getClozeKnowledge() {
        return clozeKnowledge;
    }

    public void setClozeKnowledge(long clozeKnowledge) {
        this.clozeKnowledge = clozeKnowledge;
    }


    public double getClozePoint() {
        return clozePoint;
    }

    public void setClozePoint(double clozePoint) {
        this.clozePoint = clozePoint;
    }


    public String getClozeSubject() {
        return clozeSubject;
    }

    public void setClozeSubject(String clozeSubject) {
        this.clozeSubject = clozeSubject;
    }


    public long getClozeTerm() {
        return clozeTerm;
    }

    public void setClozeTerm(long clozeTerm) {
        this.clozeTerm = clozeTerm;
    }


    public String getClozeImg() {
        return clozeImg;
    }

    public void setClozeImg(String clozeImg) {
        this.clozeImg = clozeImg;
    }

    public List<ClozeSelect> getClozeSelects() {
        return clozeSelects;
    }

    public void setClozeSelects(List<ClozeSelect> clozeSelects) {
        this.clozeSelects = clozeSelects;
    }

    public String getDisplayKnow() {
        return displayKnow;
    }

    public void setDisplayKnow(String displayKnow) {
        this.displayKnow = displayKnow;
    }

    private String listSelect() {
        StringBuilder str = new StringBuilder();
        for (ClozeSelect clozeSelect : clozeSelects) {
            str.append("A. ").append(clozeSelect.getClozeSelectOptionsa()).append("&nbsp;&nbsp;").
                    append("B. ").append(clozeSelect.getClozeSelectOptionsb()).append("&nbsp;&nbsp;").
                    append("C. ").append(clozeSelect.getClozeSelectOptionsc()).append("&nbsp;&nbsp;").
                    append("D. ").append(clozeSelect.getClozeSelectOptionsd()).append("&nbsp;&nbsp;").
                    append("<div class=\"text-success\">答案：").
                    append(clozeSelect.getClozeSelectAnswer()).append("</div>\n").
                    append("<div class=\"text-primary\"><label>解析：").
                    append(clozeSelect.getClozeSelectAnalyze()).append("</label><br></div>\n");

        }
        return str.toString();
    }

    @Override
    public String toString() {
        return "<div>\n" +
                "    <div>\n" +
                "        <div>\n" +
                "            <label>\n" + clozeTopic + " (  )<br>\n" +
                "            </label><br>\n" + listSelect() +
                "        </div>\n" +
                "        <div class=\"text-primary\"><label>知识点：" + displayKnow + "</label></div>\n" +
                "    </div>\n" +
                "</div>";
    }
}
